<?php

/**
 * Description of Offer
 *
 * @author Kam
 */
class Application_Model_DbTable_OfferTemplate extends My_Db_Table {

    protected $_name = 'offer_template';
    protected $_primary = 'offer_template_id';
    
    /**
     * 
     * @param integer $templateId
     * @return Zend_Db_Table_Select
     */
    public function getTemplateAttributes($templateId) {
        return $this->select(self::SELECT_WITHOUT_FROM_PART)
                ->from(array('ta' => 'offer_template_attribute'))
                ->where('ta.offer_template_id = ?', $templateId)
                ->order('order');
    }

    protected function getMainCodeColumnName() {
        return null;
    }
    
    public function getDefaultRowValues() {
        return array(
        );
    }

}

